package com.macaline.technology.webService;

import com.macaline.technology.webService.service.impl.WeatherServiceImpl;

import javax.xml.ws.Endpoint;

public class Main {

    public static void main(String[] args) {
        //发布天气服务，这里只是简单的测试
        Endpoint.publish("http://localhost:8085/ws_server/weather", new WeatherServiceImpl());
        System.out.println("发布天气服务成功...");
    }

//    public static void main(String[] args) throws Exception {
//
//    }

    private void test() throws Exception{
//
//        byte flag = 0;//(byte)0
//        String xml= "";
//        Object privateKey = "";
////        byte[] signature = SignatureHelper.sign(privateKey, xml);//采用私钥签名报文，签名内容只是
//        try {
//            Service service = new Service();
//            Call call = (Call) service.createCall();
//            call.setTargetEndpointAddress("");
//            call.setOperationName("operationName");
//            call.addParameter("flag", XMLType.XSD_BYTE, ParameterMode.IN);
//            call.addParameter("xml", XMLType.XSD_STRING, ParameterMode.IN);
//            call.addParameter("signature", XMLType.XSD_BASE64, ParameterMode.IN);
//            call.setReturnType(XMLType.XSD_BASE64);
////            Object[] params =new Object[]{Byte.valueOf(flag), xml, signature };
//            byte[] retData = (byte[]) call.invoke(params);
//        }
//        catch (ServiceException se)
//        {
//            throw se;
//        }
    }
}
